#!/bin/sh
#
# remake the cputime archive ... this archive is intended to be checked
# in and not remade, this script is simply a record of how this was created
#

tmp=/var/tmp/$$
rm -f $tmp.*
trap "rm -f $tmp.*; exit 0" 0 1 2 3 15

cat <<End-of-File >>$tmp.config
log mandatory on once {
    hinv.ncpu
}

log mandatory on default {
    kernel.all.cpu
    kernel.percpu.cpu
}
End-of-File

rm -f cputime.*

# generate some work
( cd ../src; make clean; make ) >/dev/null 2>&1 &

# report in parallel with other tools ...
#
mpstat -P ON 1 10 >cputime.mpstat &
sar -P ALL 1 10 >cputime.sar &

pmlogger -t 1sec -c $tmp.config -s 10 cputime

wait
